# Makefile for jGL GLUT Examples

# jGL 3D Graphics Library for Java
# Version:  2.4
# Copyright (C) 1996-2006  Robin Bing-Yu Chen

### Local Setting ###

# LOCALCLASSPATH = jgl.jar
LOCALCLASSPATH = ../..

BACKUPDIR = Example-glut_BAK

FILES = alpha alpha3D bezcurve bezmesh bezsurf checker clip colormat cube \
	doublebuffer hello light lines list material mipmap model movelight \
	pickdepth picksquare planet polys quadric robot scene select smooth \
	stroke surface tea teapots texbind texgen texsub texture3d \
	texturesurf torus unproject
# drawf

### RULES ###

.SUFFIXES: .java

.java:
	@echo "Compile" $< "and Convert" $*.html
	@$(JAVAC) $(FLAGS) -classpath $(LOCALCLASSPATH) $<
#	@./booktest $*
	@if [ -f ../Example/$*.html ]; then $(CP) ../Example/$*.html .; fi
	@$(CP) $*.html $*-pi.html 
	@$(HTMLCONV) $*-pi.html
	@cd .. ; $(RM) $(BACKUPDIR)

### TARGETS ###

all:	jgl.jar $(FILES)
	@echo "Compile GLUT Examples of jGL ok."

jgl.jar:
	@$(CP) ../Example/jgl.jar .

clean:
	@$(RM) jgl.jar
	@$(RM) *.class core
	@$(MV) alpha.html alpha.htm
	@$(MV) alpha3D.html alpha3D.htm
	@$(MV) hello.html hello.htm
	@$(MV) quadric.html quadric.htm
	@$(MV) scene.html scene.htm
	@$(MV) texbind.html texbind.htm
	@$(MV) texsub.html texsub.htm
	@$(MV) texture3d.html texture3d.htm
	@$(MV) torus.html torus.htm
	@$(MV) unproject.html unproject.htm
	@$(RM) *.html
	@$(MV) unproject.htm unproject.html
	@$(MV) torus.htm torus.html
	@$(MV) texture3d.htm texture3d.html
	@$(MV) texsub.htm texsub.html
	@$(MV) texbind.htm texbind.html
	@$(MV) scene.htm scene.html
	@$(MV) quadric.htm quadric.html
	@$(MV) hello.htm hello.html
	@$(MV) alpha3D.htm alpha3D.html
	@$(MV) alpha.htm alpha.html

include Make-config
